using System.Collections.Generic;

namespace Sixeyed.CodeGeneration.Metadata.Interfaces
{
    /// <summary>
    /// Represents a source of metadata
    /// </summary>
    public interface IMetadataSource
    {
        /// <summary>
        /// Type of metadata provided by the source
        /// </summary>
        string SourceTypeName { get;}

        /// <summary>
        /// Source name
        /// </summary>
        string Name { get;}

        /// <summary>
        /// Source description
        /// </summary>
        string Description { get;}

        /// <summary>
        /// Uri for accessing the source
        /// </summary>
        string Uri { get; set;}

        /// <summary>
        /// Friendly name for the Uri
        /// </summary>
        string UriDisplayName { get;}

        /// <summary>
        /// Returns a list of metadata providers for the source
        /// </summary>
        /// <returns>Provider name list</returns>
        List<string> GetProviderNames();

        /// <summary>
        /// Returns a metadata provider
        /// </summary>
        /// <param name="providerName">Name of provider to return</param>
        /// <returns>Initialised metadata provider</returns>
        IMetadataProvider GetProvider(string providerName);
        
        /// <summary>
        /// Adds a provider to the source's collection
        /// </summary>
        /// <param name="provider"></param>
        void AddProvider(IMetadataProvider provider);

        /// <summary>
        /// Loads all providers to the source's collection
        /// </summary>
        /// <param name="providers">Metadata providers</param>
        void LoadProviders(List<IMetadataProvider> providers);
    }
}